package month4.day27;

import java.io.File;

public class   S1 {
    public static void main(String[] args) {
        File src=new File("D:\\EDU");
        printCount(src);
        System.out.println(count);
    }
    public static int count=0;
    public static void printCount(File src){
//获取大小
        if(null!=src && src.exists()){//递归头
            if(src.isFile()){
                count+=src.length();
            }else{
                for(File s:src.listFiles()){
                    printCount(s);
                }
            }
        }
    }
}
